package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.core.domain.entity.Trusteddevice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TrusteddeviceMapper;
import com.ruoyi.system.service.ITrusteddeviceService;

/**
 * 可信设备Service业务层处理
 * 
 * @author ess
 * @date 2021-10-18
 */
@Service
public class TrusteddeviceServiceImpl implements ITrusteddeviceService 
{
    @Autowired
    private TrusteddeviceMapper trusteddeviceMapper;

    /**
     * 查询可信设备
     * 
     * @param tdid 可信设备主键
     * @return 可信设备
     */
    @Override
    public Trusteddevice selectTrusteddeviceByTdid(String tdid)
    {
        return trusteddeviceMapper.selectTrusteddeviceByTdid(tdid);
    }

    /**
     * 查询可信设备列表
     * 
     * @param trusteddevice 可信设备
     * @return 可信设备
     */
    @Override
    public List<Trusteddevice> selectTrusteddeviceList(Trusteddevice trusteddevice)
    {
        return trusteddeviceMapper.selectTrusteddeviceList(trusteddevice);
    }

    /**
     * 新增可信设备
     * 
     * @param trusteddevice 可信设备
     * @return 结果
     */
    @Override
    public int insertTrusteddevice(Trusteddevice trusteddevice)
    {
        return trusteddeviceMapper.insertTrusteddevice(trusteddevice);
    }

    /**
     * 修改可信设备
     * 
     * @param trusteddevice 可信设备
     * @return 结果
     */
    @Override
    public int updateTrusteddevice(Trusteddevice trusteddevice)
    {
        return trusteddeviceMapper.updateTrusteddevice(trusteddevice);
    }

    /**
     * 批量删除可信设备
     * 
     * @param tdids 需要删除的可信设备主键
     * @return 结果
     */
    @Override
    public int deleteTrusteddeviceByTdids(String[] tdids)
    {
        return trusteddeviceMapper.deleteTrusteddeviceByTdids(tdids);
    }

    /**
     * 删除可信设备信息
     * 
     * @param tdid 可信设备主键
     * @return 结果
     */
    @Override
    public int deleteTrusteddeviceByTdid(String tdid)
    {
        return trusteddeviceMapper.deleteTrusteddeviceByTdid(tdid);
    }
}
